/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.autoescola.core.dao.security.role;

import com.autoescola.core.dao.Dao;
import com.autoescola.core.entity.security.Role;
import com.autoescola.core.entity.security.User;
import java.util.List;
import javax.validation.constraints.NotNull;

/**
 *
 * @author leonardo luz fernandes
 * @since 01/11/2010
 * @version 0.1
 */

@Dao
public interface RoleDao {

    public Role create( @NotNull Role role );
    public Role update( @NotNull Role role );
    public boolean delete( @NotNull Role role );
    public List<Role> list();

    public boolean add( @NotNull User user , @NotNull Role role );
    public boolean remove( @NotNull User user , @NotNull Role role );
    public List<Role> listRoles( @NotNull User user );
    public List<User> listUsers( @NotNull Role role );

}//end interface
